#pragma once

#include <Windows.h>
#include "DirectX\Device.h"
#include "NeroEngine\NGraphics.h"

namespace Graphics
{
	class Camera;
	class D3DDevice;
	class Text;
	class RenderTexture;
	class RenderTarget;

	class ColorShader;
	class TextureShader;
	class ReflectionShader;
}

namespace Engine
{
	class NPlatform;
}

namespace System
{
	class Win32DebugDisplay;
}

namespace System
{
class Win32Graphics : public Engine::NGraphics
{
	RTTI_DECLARATIONS(Win32Graphics, Engine::NGraphics)
public:
	Win32Graphics();
	virtual ~Win32Graphics(void);
	virtual void Initialize(Engine::NPlatform* owner, HINSTANCE instance, int showCommand);
	virtual void Deinitialize();
	virtual void Render();
	virtual void Update(float deltaTime);
	virtual void ProcessInput();
	D3DXMATRIX GetBaseMatrix(){ return mBaseViewMatrix;}
	Graphics::D3DDevice* GetDevice();
	Win32DebugDisplay* GetDebugDisplay(){return mDebugDisplay;}

	bool RenderToTexture(Graphics::RenderTexture* texture, float rotation);
	void RenderScene();
	bool RenderFadingScene();

private:	
	Graphics::D3DDevice* mDevice;
	Graphics::Camera* mSceneCamera;
	D3DXMATRIX mBaseViewMatrix;
	Win32DebugDisplay* mDebugDisplay;
};
}